namespace Slaks.Graphs
{
	public class Edge
	{
		private Vertex m_targetVertex;
		private string m_sectionType;
		private double m_frequency = 1.0;

		internal Edge(Vertex target, string sectionType)
		{
			m_targetVertex = target;
			m_sectionType = sectionType;
		}

		public Vertex GetTarget()
		{
			return m_targetVertex;
		}

		public string GetSectionType()
		{
			return m_sectionType;
		}

		public double GetFrequency()
		{
			return m_frequency;
		}

		internal void IncreseFrequency()
		{
			m_frequency += 1;
		}

		public void SetFrequency(double frequency)
		{
			m_frequency = frequency;
		}

		public Edge Clone()
		{
			Vertex vertex = new Vertex(m_targetVertex.GetId(), m_targetVertex.Frequency);
			Edge edge = new Edge(vertex, m_sectionType);
			return edge;
		}
	}
}